package com.example.springboot.controller;

import com.example.springboot.service.EmailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class EmailController {
    @Autowired
    private EmailService emailService;

    @RequestMapping("/send")
    public boolean send(){
        String to = "779907039@qq.com";
        String title = "测试邮件";
        String content = "11111111111";
        boolean flag = emailService.send(to,title,content);
        return flag;
    }
}
